#ifndef _OBSERVER_H_
#define _OBSERVER_H_
#include <iostream>
#include <memory>
using namespace std;

class publisher;

class observer {
    public:
        observer(string name, unique_ptr<publisher> pub) :
        name(name), pub(std::move(pub)){
            doSubscribing();
        };
        virtual void doSubscribing();
        virtual void cancleSubscribing();
        virtual void update();
    private:
        unique_ptr<publisher> pub;
        string name;
};
#endif